package com.example.shopping.service;

import com.example.shopping.entity.Address;
import com.example.shopping.mapper.AddressMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressService {
    @Autowired
    private AddressMapper addressMapper;

    //获取某个用户的所有收获地址
    public List<Address> getAddress(Integer userId) {
        return addressMapper.getAddress(userId);
    }

    public Address getAddressById(Integer addressId) {
        return addressMapper.getAddressById(addressId);
    }
}
